﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="Dost.Khcn.Web.WebOnline.Default" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Tra cứu nhân lực KHCN</title>
    <link href="/Content/SiteOnline.css" rel="stylesheet" />
    <link href="/Content/themes/base/jquery-ui.css" rel="stylesheet" />
    <link href="/Scripts/jtable/themes/jqueryui/jtable_jqueryui.css" rel="stylesheet" />
    <script src="/Scripts/jquery-1.8.2.min.js"></script>
    <script src="/Scripts/jquery-ui-1.8.24.min.js"></script>
    <script src="/Scripts/jquery.cookie.js"></script>
    <script src="/Scripts/knockout-3.0.0.js"></script>
    <script src="/Scripts/knockout.mapping-latest.js"></script>
    <script src="/Scripts/jquery.blockUI.js"></script>
    <script src="/Scripts/jtable/external/json2.js"></script>
    <script src="/Scripts/jtable/jquery.jtable.min.js"></script>
    <script src="/Scripts/jtable/localization/jquery.jtable.vi.js"></script>
    <script src="/Scripts/jtable/extensions/jquery.jtable.aspnetpagemethods.js"></script>
    <script src="/Scripts/search.js"></script>
</head>
<body>
    <form id="form1" runat="server">
        <div class="filtering">
            <table>
                <tr>
                    <td>Tên chuyên gia: </td>
                    <td>
                        <input data-bind="value: searchModel().hoTen" class="name" /></td>
                </tr>
                <tr>
                    <td>Lĩnh vực nghiên cứu: </td>
                    <td>
                        <select style="width:350px;" data-bind="options: linhVucs, optionsText: 'Ten', optionsValue: 'Id', value: searchModel().linhVucId"></select>
                    </td>
                </tr>
                <tr>
                    <td>
                        Học hàm:
                    </td>
                    <td>
                        <select data-bind="options: hocHams, optionsText: 'Ten', optionsValue: 'Id', value: searchModel().hocHamId"></select>
                        Học vị:
                    <select data-bind="options: hocVis, optionsText: 'Ten', optionsValue: 'Id', value: searchModel().hocViId"></select>
                    </td>
                </tr>
                <tr>
                    <td>Địa điểm công tác: </td>
                    <td>
                        <input data-bind="value: searchModel().tenDonVi" class="name" /></td>
                </tr>
                <tr>
                    <td>Công trình nghiên cứu:</td>
                    <td>
                        <input data-bind="value: searchModel().tenCongTrinh" class="name" /></td>
                </tr>
                <tr>
                    <td></td>
                    <td>
                        <button data-bind="click: search">Search</button>
                        <button data-bind="click: reset">Reset</button></td>
                </tr>
            </table>

        </div>
        <div id="ListContainer">
        </div>

        <script type="text/javascript">
            $(function () {
                $(document).ajaxStop($.unblockUI);
                $('#ListContainer').jtable({
                    //title: 'Chuyên gia',
                    paging: true,
                    pageSize: 10,
                    sorting: true,
                    defaultSorting: 'HoTen ASC',
                    actions: {
                        listAction: 'Default.aspx/SearchChuyenGia'
                    },
                    fields: {
                        HoTen: {
                            title: 'Chuyên gia',
                            width: '30%',
                            display: function (data) {
                                return '<a href="ChuyenGiaDetails.aspx?id=' + data.record.Id + '">' + data.record.HoTen + '</a>';
                            }
                        },
                        TenLinhVuc: {
                            title: 'Lĩnh vực nghiên cứu',
                            width: '70%',
                            sorting: false
                        }
                    }
                });

                ko.applyBindings(new SearchViewModel());
            });
        </script>
    </form>

</body>
</html>
